How to activate Trigger when project opened

Hi,

I want a trigger to run when a project/folder is selected in the database explorer. I have successfully used module triggers previously, but cannot figure out how to make it run at a higher level.

The help file contains this code:
 

Trigger t1 = trigger("init", project, pre, open, 10, "#include <triggers/projOpen>")

 


This appears to me to be a trigger which runs before a project is opened. However, when I used that syntax (changing their include file for something simple like a message box), the trigger does not upload. My code is:

 

 

 

string s_dxl = "
ack \"yes\"
"
 
Trigger t1
 
t1 = trigger("init", project, pre, open, 10, s_dxl)
if (null(t1)) ack "Trigger empty"



Firstly, is it possible to assign a trigger to a project and, if it is, how do you do it?

Thanks,
Simon



 

 


SystemAdmin - Mon Aug 16 04:50:59 EDT 2010

Re: How to activate Trigger when project opened
Mathias Mamsch - Mon Aug 16 10:49:52 EDT 2010

If this would be possible, then the already weak security of DOORS would be even more compromised. Imagine that just by opening a project you will run some DXL. You just need to install some virus DXL (remember DXL can write to the registry, start processes, download from the internet, etc). So some high priviledge user that by accident clicks on your project would give you his access. Bad enough the same can be done for modules. Just put your trigger to a link module, draw an inlink to any module and hope some user will open the link module by some traceability script, or something ...

But coming back to your question:

I am not completly sure, but I think this is not possible. If you find out the opposite, feel free to post it. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: How to activate Trigger when project opened
llandale - Mon Aug 16 18:01:18 EDT 2010

Project triggers are residual artifacts from version 4.0 days when you had to log in to each Project separately. The do not work in v5+, including version 9.

Telelogic adopted a policy to insure that old DXL still 'worked' in newer versions, meaning 'Doesn't generate interpret errors', but SHEESH, if there are no more projects open events then surely I'd prefer my old v4 DXL to generate an error rather than not work at all.

Its sort of like the Cross Walk Buttons on lights in Manhattan. They haven't been connected for years and they really should have disabled them visually.

  • Louie

Re: How to activate Trigger when project opened
SystemAdmin - Fri Aug 20 06:28:38 EDT 2010

Hi,

Thanks for the replies Mathias and Louie. The technique of putting the trigger on a link module is interesting, but seems to provide the same effect as putting the trigger on all modules. I suppose it does limit the number of modules the trigger is called by (assuming only certain modules have links through that link module) and removes the need to put a check at the start of the trigger to confirm the module is one you want the trigger to run from. On first thoughts though it could make it tricky to get a handle on the current formal module, depending on what you want the trigger to do.

I would be happy to have trigger called by projects - users should not be installing random triggers without knowing what they do anyway! I think it would be useful for high level trigger calls. For example, displaying an information box specific to a certain project. Thanks for the history Louie, that explains why it is still in the help file but cannot be done.

Simon.